-
-
Notifications
You must be signed in to change notification settings - Fork 407
Support PackageImports in hiddenPackageSuggestion #4537
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
...hls-cabal-plugin/test/testdata/cabal-add-testdata/cabal-add-tests/test/MainPackageImports.hs
Show resolved
Hide resolved
...hls-cabal-plugin/test/testdata/cabal-add-testdata/cabal-add-tests/test/MainPackageImports.hs
Show resolved
Hide resolved
48e4cc5 to
39d3f61
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I have addressed all previous comments. Please take another look.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you for your contribution ❤️
|
Thanks for your review! I had a great experience in my first HLS PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also notice that the "not found" error remains even after the dependency is added by the code action (with and without PackageImports). That may be a bug of my lsp client (eglot on Emacs) or HLS. Needs further investigation.
Oh, it is indeed a known HLS bug. With HLS 2.10.0.0 and vscode 2.5.3, I need to manually restart HLS or saving hie.yaml after adding dependencies to .cabal file to let HLS find the newly added dependencies.
In addition, there seems to be a bug in my preferred setting: Emacs with eglot as a LSP client. In that setting, only manual restart works and saving hie.yaml has no effect.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that sounds correct!
|
@jian-lin It looks like you need to rebase your PR or merge changes from master into it before we can merge :) |
39d3f61 to
4efa5d7
Compare
|
@fendor Rebased. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you!
Fix: #4479
TODO: Probably I need to add more tests.
CC @VeryMilkyJoe @fendor
Video demo
hls-4479-demo.mp4
More info
Here is the string being matched.
With
PackageImportsWithout
PackageImportsI also notice that the "not found" error remains even after the dependency is added by the code action (with and without
PackageImports). That may be a bug of my lsp client (egloton Emacs) or HLS. Needs further investigation.